var Point = function(x, y) {
    this.x = x || 0;
    this.y = y || 0;
    
    this.add = function(point) {
        return new Point(this.x + point.x, this.y + point.y);
    };
    
    this.subtract = function(point) {
        return new Point(this.x - point.x, this.y - point.y);
    };
    
    this.multiply = function(point) {
        return new Point(this.x * point.x, this.y * point.y);
    };
    
    this.distance = function(point) {
        var xDistance = this.x - point.x;
        var yDistance = this.y - point.y;
        
        return Math.sqrt((xDistance * xDistance) + (yDistance * yDistance));
    };
}